<template>
	<view class="pages">
		<my-header bgColor="bg-gradual-blue" :isBack="true" >
			<block slot="backText">返回</block>
			<block slot="content">搜索</block>
		</my-header>
    <view class="col">
		<textarea placeholder="请输入要转换的链接"  v-model="content"/>
        
        <view class="btn col bg-gradual-blue" @click="search()">搜索</view>
    </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
                // type_list:[
                //     {
                //         value:"j",
                //         name:"京东"
                //     },{
                //         value:"t",
                //         name:"淘宝/天猫"
                //     },{
                //         value:"p",
                //         name:"拼多多"
                //     }
                // ],
                content:"",
                type:"j"
			}
		},
		onLoad() {
            uni.getClipboardData({
                success: (res)=> {
                    console.log(res.data);
                    this.content=res.data
                }
            });
		},
		methods: {
			go(link){
				console.log(link)
            },
            radioChange(e){
                console.log(e);
                this.type=e.detail.value
            },
            search(){
                let url=`../detail/detail?url=${this.content}&type=${this.type}`
                console.log(url);
                uni.navigateTo({
                     url
                });
                
            },
           
		}
	}
</script>

<style lang="scss">
	@import "./search";
</style>